projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c748b2
)
Fix bug with "%%" in error format
author
Paul Eggert
<eggert@cs.ucla.edu>
Wed, 31 May 2017 23:50:08 +0000
(16:50 -0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Wed, 31 May 2017 23:50:24 +0000
(16:50 -0700)
* src/doprnt.c (doprnt): Format "%%" correctly.
Problem reported by Philipp Stephani in:
http://lists.gnu.org/archive/html/emacs-devel/2017-05/msg00901.html
src/doprnt.c
patch
|
blob
|
history
diff --git
a/src/doprnt.c
b/src/doprnt.c
index bed9350f4a6d6e26ffe82cd0691c7c4fae80bdb1..418601acb025d06910c529e657c7bf564e39f692 100644
(file)
--- a/
src/doprnt.c
+++ b/
src/doprnt.c
@@
-438,7
+438,9
@@
doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
}
case '%':
- fmt--; /* Drop thru and this % will be treated as normal */
+ /* Treat this '%' as normal. */
+ fmt0 = fmt - 1;
+ break;
}
}